<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Configuration</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
						<script src="../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../media/images/plus.png";
				imgMinus.src = "../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
	<table class="tutorial-nav-box">
	<tr>
		<td style="width: 30%">
							<a href="../Nexista/tutorial_sitemap.raw.pkg.html"><img src="../media/images/previous_button.png" alt="Previous"></a>
					</td>
		<td style="text-align: center">
							<a href="../Nexista/tutorial_reference.pkg.html"><img src="../media/images/up_button.png" alt="Up"></a>
					</td>
		<td style="text-align: right; width: 30%">
							<a href="../Nexista/tutorial_config.config.pkg.html"><img src="../media/images/next_button.png" alt="Next"></a>
					</td>
	</tr>
	<tr>
		<td style="width: 30%">
							<span class="detail">map:raw</span>
					</td>
		<td style="text-align: center">
							<span class="detail">Reference</span>
					</td>
		<td style="text-align: right; width: 30%">
							<span class="detail">config</span>
					</td>
	</tr>
</table>
	
<div><a name=""></a><div class="ref-title-box"><h1 class="ref-title">Configuration</h1></div>
 
 <span><a name="overview"></a><h2 class="title">Overview</h2><p>The configuration system of Nexista is XML based and is designed to allow for 
multiple modes (i.e live, development, etc...).</p>

<p>The configuration of the application is determined by 2 files. A master config 
file and an optional user override file. These files are XML based andis organized 
into sections (path, datasource in the example) and directives (core,lib,etc..).</p>
<pre class="listing"><pre>
&lt;config&gt;
    &lt;!-- PATH SETTINGS --&gt;
    &lt;path&gt;
        &lt;core&gt;/home/lotus/nexista/kernel/&lt;/core&gt; 
        &lt;lib&gt;/home/lotus/nexista/lib/&lt;/lib&gt; 
        &lt;xsl&gt;/home/lotus/nexista/kernel/xsl/&lt;/xsl&gt;
    &lt;/path&gt;

    &lt;datasource id=&quot;lotus&quot;&gt;        
        &lt;hostname&gt;127.0.0.1&lt;/hostname&gt;
        &lt;hostname mode=&quot;live&quot;&gt;127.0.0.1&lt;/hostname&gt;
        &lt;!-- db type (myssql, etc... see metabase for list) --&gt;
        &lt;type&gt;mysql&lt;/type&gt;
        &lt;!-- db name --&gt; &lt;database&gt;lotus&lt;/database&gt;
        &lt;!-- db username --&gt;
        &lt;username&gt;root&lt;/username&gt;
        &lt;!-- db password --&gt;
        &lt;password&gt;&lt;/password&gt;
    &lt;/datasource&gt;
etc...</pre></pre>
<p>Each section can have an id attribute. This id attribute can be specified 
during runtime retrieval of a value. For example, in this case we have the datasource 
id=&quot;lotus&quot; which indicates the connection name as found 
in a query file. One could create other datasources such as lotus-backup 
and, using the Exception Handler for the database connection, create a fallback 
system in case of database failure.</p>

<p>Each directive accepts an optional mode. This mode can be specified at build 
time to compile the application according to the desired mode. For example, 
certain directives for error handling for a live mode might suppress 
error displaying while the default (or another mode) might display errors.</p>

<p>The optional user file uses the same format but can be used to override the 
values in the master file.</p>
<p>When a value is aked for during build time, the search will take place in the 
following order (if a mode is used):</p>
<ul mark = "bullet"><li><p>User directive with mode</p></li>  
<li><p>Master directive with mode</p></li>     
<li><p>User directive w/o mode</p></li>  
<li><p>Master directive w/o mode</p></li></ul></span>
  
 <span><a name="reference"></a><h2 class="title">Reference</h2><p>This is a reference for the configuration file directives</p>
 <ul mark = "bullet"><li><p><a href="../Nexista/tutorial_config.config.pkg.html">config</a></p></li>
<li><p><a href="../Nexista/tutorial_config.path.pkg.html">path</a></p></li>
<li><p><a href="../Nexista/tutorial_config.path.core.pkg.html">core</a></p></li>
<li><p><a href="../Nexista/tutorial_config.path.lib.pkg.html">lib</a></p></li>
<li><p><a href="../Nexista/tutorial_config.path.xsl.pkg.html">xsl</a></p></li>
<li><p><a href="../Nexista/tutorial_config.path.datasources.pkg.html">datasources</a></p></li>
<li><p><a href="../Nexista/tutorial_config.path.handlers.pkg.html">handlers</a></p></li>
<li><p><a href="../Nexista/tutorial_config.path.actions.pkg.html">actions</a></p></li>             
<li><p><a href="../Nexista/tutorial_config.path.validators.pkg.html">validators</a></p></li>        
<li><p><a href="../Nexista/tutorial_config.path.builders.pkg.html">builders</a></p></li>            
<li><p><a href="../Nexista/tutorial_config.path.compile.pkg.html">compile</a></p></li>             
<li><p><a href="../Nexista/tutorial_config.path.cache.pkg.html">cache</a></p></li>            
<li><p><a href="../Nexista/tutorial_config.path.tmp.pkg.html">tmp</a></p></li>     
<li><p><a href="../Nexista/tutorial_config.path.logs.pkg.html">logs</a></p></li>
<li><p><a href="../Nexista/tutorial_config.build.pkg.html">build</a></p></li>
<li><p><a href="../Nexista/tutorial_config.build.sitemap.pkg.html">sitemap</a></p></li>
<li><p><a href="../Nexista/tutorial_config.build.loader.pkg.html">loader</a></p></li>
<li><p><a href="../Nexista/tutorial_config.build.prepend.pkg.html">prepend</a></p></li>
<li><p><a href="../Nexista/tutorial_config.build.default.pkg.html">default</a></p></li>
<li><p><a href="../Nexista/tutorial_config.build.missing.pkg.html">missing</a></p></li>           
<li><p><a href="../Nexista/tutorial_config.build.query.pkg.html">query</a></p></li>
<li><p><a href="../Nexista/tutorial_config.datasource.pkg.html">datasource</a></p></li>
<li><p><a href="../Nexista/tutorial_config.datasource.hostname.pkg.html">hostname</a></p></li>
<li><p><a href="../Nexista/tutorial_config.datasource.database.pkg.html">database</a></p></li>
<li><p><a href="../Nexista/tutorial_config.datasource.type.pkg.html">type</a></p></li>
<li><p><a href="../Nexista/tutorial_config.datasource.username.pkg.html">username</a></p></li>
<li><p><a href="../Nexista/tutorial_config.datasource.password.pkg.html">password</a></p></li>
<li><p><a href="../Nexista/tutorial_config.auth.pkg.html">auth</a></p></li>
<li><p><a href="../Nexista/tutorial_config.auth.expire.pkg.html">expire</a></p></li>
<li><p><a href="../Nexista/tutorial_config.auth.idle.pkg.html">idle</a></p></li>
<li><p><a href="../Nexista/tutorial_config.runtime.pkg.html">runtime</a></p></li>
<li><p><a href="../Nexista/tutorial_config.runtime.cache.pkg.html">cache</a></p></li></ul></span></div>

	<table class="tutorial-nav-box">
	<tr>
		<td style="width: 30%">
							<a href="../Nexista/tutorial_sitemap.raw.pkg.html"><img src="../media/images/previous_button.png" alt="Previous"></a>
					</td>
		<td style="text-align: center">
							<a href="../Nexista/tutorial_reference.pkg.html"><img src="../media/images/up_button.png" alt="Up"></a>
					</td>
		<td style="text-align: right; width: 30%">
							<a href="../Nexista/tutorial_config.config.pkg.html"><img src="../media/images/next_button.png" alt="Next"></a>
					</td>
	</tr>
	<tr>
		<td style="width: 30%">
							<span class="detail">map:raw</span>
					</td>
		<td style="text-align: center">
							<span class="detail">Reference</span>
					</td>
		<td style="text-align: right; width: 30%">
							<span class="detail">config</span>
					</td>
	</tr>
</table>
	
	<p class="notes" id="credit">
		Documentation generated on Wed, 03 May 2006 13:48:43 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>